﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="systemSubjectList.aspx.cs" Inherits="Manage_Cms_systemSubjectList" %>


<html>
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <%=ManageHelper.PageErrMsg()!=""?"<div class='msg_failed'>"+ManageHelper.PageErrMsg()+"</div>":""%>
    <div class="mycolumn" style="border: 0; margin: 0; padding: 0">
        <table align="left">
            <tr>
                <td align="left" class="tdbutton">
                    <input type="button" value="添加专题源模板" class="button" style="width: 100px;"
                        onclick="ymPrompt.win('systemSubjectItem.aspx?TemplateID=<%=TemplateID %>&FileType=7',600,430,'添加专题源模板',null,null,null,true);" />
                </td>
            </tr>
        </table>
    </div>
    <div class="column">
        <div class="columntitle"> 模板管理：</div>
        <table cellspacing="0" cellpadding="0" rules="all" align="center" border="0" id="MyDataGrid"
            style="border-width: 0px; width: 100%; border-collapse: collapse;">
            <tr class="summary-title" style="height: 25px" align="left">
                <td style="width: 18%;"> &nbsp;&nbsp;文件名称</td>
                <td style="width: 10%;">模板类型</td>
                <td style="width: 15%;" align="center">网页自动生成时间</td>
                <td style="width: 10%;" align="center">频率（分钟）</td>
                <td style="width: 10%;" align="center">使用次数</td>
                <td style="width: 15%;" align="center">模板修改时间</td>
                <td align="center">操作</td>
            </tr>
            <%
                int i=0;
                string strFileName = "";
                foreach (KeRui.Model.CmsTemplateFile model in list)
                {
                    if (strFileName != model.FileName.Substring(0, (model.FileName + "_").IndexOf('_')))
                    {
                        %>
                        <tr class="tdbg">
                            <td align="left" colspan="8">
                                <span class="columntitle" style="width: 100%"><b>
                                    <%=model.FileName.Substring(0, (model.FileName + "_").IndexOf('_'))%>
                                </b></span>
                            </td>
                        </tr>
                        <% 
                    }
                    strFileName = model.FileName.Substring(0, (model.FileName + "_").IndexOf('_'));
                    %>
            <tr class="tdbg" onmouseover="this.className='tdbg-dark';" onmouseout="this.className='tdbg';"
                style="height: 25px;" align="left">
                <td>
                    &nbsp;&nbsp;<%=model.FileName%></td>
                <td>
                    <%=WebConfig.GetName("TemplateFileType", model.FileType.ToString())%>
                </td>
                <td align="center">
                    <%=model.FileUpdateTime %>
                </td>
                <td align="center">
                    <%=model.FileUpdateInterval>1?model.FileUpdateInterval+"分钟":"不自动更新"%>
                </td>
                <td align="center">
                    <%=model.UsingNum%>
                </td>
                <td align="center">
                    <%=model.UpdateTime%>
                </td>
                <td align="center">
                    <a href="javascript:ymPrompt.win('TemplateFileListBackUp.aspx?&ID=<%=model.FileID %>',600,430,'历史还原',null,null,null,true);">
                        历史</a> | <a href="TemplateFileItem.aspx?act=reduce&TemplateID=<%=model.TemplateID %>&id=<%=model.FileID %>"
                            onclick="javascript:return confirm('此操作将还原模板“<%=model.FileName %>”，确认吗？');">
                            <%=model.IsDefault == 0 ? "还原 |" : ""%>
                        </a><a href="javascript:ymPrompt.win('systemSubjectItem.aspx?act=edit&FileType=<%=model.FileType %>&ID=<%=model.FileID %>',600,430,'修改模板',null,null,null,true);">
                            编辑</a> |
                    <%=model.IsDefault != 0 ? "<a href=\"systemSubjectItem.aspx?&act=del&id=" + model.FileID + "\" onclick=\"javascript:return confirm('此操作将删除模板“" + model.FileName + "”，确认吗？');\">删除</a>" : "<s>删除</s>"%>
                    | <a href="systemSubjectItem.aspx?ID=<%=model.FileID %>&act=view" target="_blank">预览</a>  
                    <% 
                    if(model.FileType==7)
                    {
                    %>
                    | <a href="javascript:ymPrompt.win('SubjectTemplateItem.aspx?id=<%=model.FileID %>&TemplateID=<%=model.TemplateID %>',500,230,'更改图样和预览',null,null,null,true);">匹配</a>
                    <% 
                    }
                    %>
                    
                    </td>
                <!--http://www1.iportalcms.cn/Template/sz2500news-->
            </tr>
            <%
                }
            %>
        </table>
    </div>
</body>
</html>
